var datagrid; //定义全局变量datagrid
var editRow = undefined; //定义全局变量：当前编辑的行

$(function(){


    //加载防范措施列表数据
    var hdId = $("#hdId").val();
    datagrid = $("#precautionList").datagrid({
        url: ROOT_PATH+'/hiddenDanger/hdRegister/queryPrecautionList.shtml?hdId='+hdId, //请求的数据源
        iconCls: 'icon-save', //图标
        //pagination: true, //显示分页
        //pageSize: 3, //页大小
        //pageList: [3, 6, 9], //页大小下拉选项此项各value是pageSize的倍数
        rownumbers:true,
        singleSelect:true,
        fit: true, //datagrid自适应宽度
        fitColumns: true, //列自适应宽度
        striped: true, //行背景交换
        nowap: true, //列内容多时自动折至第二行
        //border: false,
        idField: 'id', //主键
        toolbar:'#tb',
        columns: [[//显示的列
            {field:'id',width:100,checkbox:true},
            //{field:'dutyUserId',width:100,hidden:true},
            {field:'dutyUserId',title:'责任人id',width:200,hidden:true
            },
            {field:'dutyUserName',title:'责任人',width:200},
            {field:'measureContent',title:'措施内容',width:300},
            {field:'startTime',title:'开始时间',width:200},
            {field:'endTime',title:'结束时间',width:200}
        ]]

    });






});
